package com.zpark.drug.pojo;

import com.zpark.drug.common.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 供应商信息
 */
@Table(name = "supplier")
public class Supplier {

    @Id
    @Column(name = "supplier_id")
    private Integer id;
    /**
     * 供应商名称
     * */
    @Column(name = "supplier_name")
    private String name;
    /**
     * 供应商描述
     */
    @Column(name = "supplier_content")
    private String content;
    /**
     * 创建时间
     * */
    @Column(name = "supplier_createtime")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createtime;
    public String getCretatetimeStr(){
        return DateUtil.dateConvert(createtime);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
}
